package com.example.feign.user.fallback;

import com.example.common.api.ResultUtil;
import com.example.feign.user.UserFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;

@Component
@Slf4j
public class UserFeignFallback implements UserFeignClient {

    @Override
    public ResultUtil getUser(String mobile, String password) {
        log.info("demo-user服务器异常");
        return ResultUtil.failed("服务降级");
    }

    @Override
    public ResultUtil getAddressById(Long id) {
        log.info("demo-user服务器异常");
        return ResultUtil.failed("服务降级");
    }

    @Override
    public ResultUtil getAddressByUserId(Long id) {
        log.info("demo-user服务器异常");
        return ResultUtil.failed("服务降级");
    }
}
